Skip to content

Check Todo applicability before loading research implementations - #8743

Merged
cocolord merged 1 commit into
mainfrom
codex/r1-terminal-domain-loading-20261114t051240
Nov 14, 2026
Merged

cocolord merged 1 commit into
mainfrom
codex/r1-terminal-domain-loading-20261114t051240

Conversation

@cocolord

@cocolord cocolord commented Nov 14, 2026 •

Copy link
Copy Markdown
Member

Completion of a Todo without research or replan applicability signals loaded research implementation modules before the existing guard checked that Todo. An unavailable research module could therefore block recording an ordinary completion. Load the same implementations after that guard, so ordinary completion and receipt replay remain usable while selected research failures retain their error and commit no completion.

Validation at 83b1a630dd6c78e479dd25097715e97b081cfb56:

  • Native authority/terminal/research suite: 108 passed; the two unavailable-module cases reproduce the original ordinary-completion failure on the retained baseline.
  • Real research CLI suite: 11 passed at 6fd0b3c39bccb90e944d932fb0fd54337e48a99a; final production/test/build inputs are byte-identical after the paired documentation correction.
  • Independently built Core wheel, installed alone: real File and SQLite completion, independent evidence/receipt readback, replay and selected-research failure pass; the installed dispatcher and terminal module bytes match this head.
  • C1 combinations at C1: unify work sources and validate recovery #8266 b0b930bfb92a847193f37580b61c7a582155f1d9 and Unify Turn role execution and define one runtime entry for heartbeat and products #8484 b7e4e01cc42300fb72f85c8d4c9ec3cb96b47798: 190 and 189 passed. Against base 0dfaf72549687b3d4b26f6cfdbaa3d134fa78c3d, this patch adds no conflict paths; the existing 4 and 13 paths remain.
  • TypeScript and staged/head bilingual checks passed. The final-head standard premerge passed all 4 direct checks and 11 selected checks with no failures. The matched current-base native replay passed all 107 existing cases. Production code and test fixtures are unchanged by the scope correction.

The paired RFC checkpoint records the delivered dependency-failure boundary. Research- or replan-associated Todos still enter the existing policy check and load its implementations, including when that policy ultimately returns disabled. This remaining loading dependency, full D2/D5 closure, real-model Host/context continuity, progressive controls, complete costs, R1/M3 and C1 default cutover remain open.

Signed-off-by: lusendong.6789 <lusendong.6789@bytedance.com>
Co-authored-by: TRAE CLI <traecli@bytedance.com>
@cocolord
cocolord force-pushed the codex/r1-terminal-domain-loading-20261114t051240 branch from 6fd0b3c to 83b1a63 Compare November 14, 2026 05:57
@cocolord cocolord changed the title Load research implementations only for research completion Check Todo applicability before loading research implementations Nov 14, 2026

@cocolord cocolord left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent; GPT-6; OpenAI; self_reported

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

通过 CLI 记录普通任务完成结果的用户和 Agent 会遇到这个问题。此前,没有研究或重规划标记的任务也会先加载研究实现;实现不可用时,已完成的普通工作无法记入状态。现在原适用性检查先运行,这类任务仍可写入完成证据并重放原回执。

源码和独立安装的 Core 上,File 与 SQLite 均能在任一研究实现不可用时完成普通任务、独立回读证据,并在重试时保持同一结果与回执。这次不选择最小预设、不改变资格或权限规则、不切换 C1 默认路径,也不宣称模型收益或整个 RFC 完成。

带研究或重规划标记的任务仍进入原策略检查;策略关闭时仍会加载两个研究实现。真实模型上下文延续、渐进控制、完整成本与 R1/M3 验收继续开放。

改动思路 / Approach

原适用性判断、研究策略和事务写入继续各由既有 owner 负责;移动两个 import 已能修复实测故障,没有理由另建状态或 C1 管线。当前 PR 的边界是普通完成的依赖故障隔离及持久化重放;关闭策略的重规划加载和完整最小组合留给既有配置 owner 与 R1 验收。

实际入口仍是 coordination.local_authority.todo_terminal。它从 canonical writer(唯一状态写入边界)取得 provider 的 Todo,原研究适用性判断决定是否需要研究路径;之后才加载原实现。没有增加第二套配置、权限判断、回执或 C1 producer/consumer。把研究检查删掉虽然更短,却会降低完成资格;保持现状则保留已经重现的无关依赖故障。

在精确提交 83b1a630dd6c78e479dd25097715e97b081cfb56,触发与结果的对比如下。这张表说明源码分支;执行依据是独立的真实状态回读与故障注入。

触发 基线 本提交
普通 Todo、任一研究实现不可用 完成被 import 错误阻断 记录结果;同一操作重放原回执
已选中研究 Todo、实现不可用 失败 仍失败;两次尝试均无状态或回执写入
重规划 Todo、研究策略关闭、实现可用 加载后返回无研究要求 相同;加载依赖仍待隔离

具体改动 / Changes

全量 diff 为 147 行新增、2 行删除:生产文件只移动两个 import,96 行测试覆盖四种后端/模块组合,49 行双语 checkpoint 记录边界。没有生成文件或私有运行状态进入 PR。

关键代码讲解

  1. ResearchTerminalEvidenceHost.qualify 保持 role、status、action_kind、capability binding、result refs 与 replan obligation 的原判断。提前返回后不加载实现;已选中路径仍核对 registry digest、解析原配置、检查原证据并保留 host 锁与清理。
  2. terminalLifecycleLocalCoordinationTodo 是未改动的真实调用者。原请求解码、source admission、writer fence、资格判断、CAS(版本一致才提交)和 receipt replay 继续承担权限与一致性;模块异常由原 runtime 返回 failed,不能变成完成证据。
  3. ordinary completion stays available without research implementation modules 在新进程阻断实际模块,使用真实 File/SQLite store。它独立回读 done、evidence、原 receipt,检查重放不改状态,并重复检查研究失败无 mutation/receipt,最后确认 runtime 仍可使用。

评审规格为 docs/architecture/rfcs/monorepo-distribution-split-v0.md,固定在变更前 0dfaf72549687b3d4b26f6cfdbaa3d134fa78c3d;新增 checkpoint 不能反过来定义验收。V1 只完成普通终态这一加载边界,完整闭包仍 deferred;V2 的本路径权限/重放回归通过,两预设完整资格仍 deferred;V3 的真实研究 CLI 回归通过,完整命令 corpus 仍 deferred。V4、V5、V10、R1、M3、D2、D5 均继续 deferred,分别需要真实 Host 恢复、完整上下文、成对完整成本与既有最小组合/发布验收。没有将未来资格重标为通过。

对主干的风险 / Risks

最重要的反向风险是跳过已选中的研究资格。原谓词未变,缺失模块测试在同一 provider 同时保留普通与研究 Todo,选中研究的两次失败都保持 missing receipt 和完全相同的状态。模块可用时,固定当前基线的 107 项原 native 用例与候选的同一集合全部通过。源码与独立安装 Core 都覆盖真实 File/SQLite,未把 mock 的状态写入当成验证。

PASS:最终提交 native 套件 108 项;真实研究 CLI 11 项;全树 TypeScript;最终 standard premerge 的 4 项直接检查和 11 项选中检查;staged/head 双语及本次 public 文件/PR body 检查。CLI、类型检查和 Core build 在 6fd0b3c39bccb90e944d932fb0fd54337e48a99a 执行,最终 amend 仅改双语文档,已核对生产、测试与构建输入没有字节变化;native 与 premerge 在最终提交执行。

C1 #8266 固定在 b0b930bfb92a847193f37580b61c7a582155f1d9,#8484 固定在 b7e4e01cc42300fb72f85c8d4c9ec3cb96b47798。同一生产改动组合后分别通过 190/189 项 authority、context、recovery 回归。相对固定基线,原有 4/13 个冲突路径仍在,新增冲突为零;不能据此声明两项 C1 已可合入,也没有修改其作者分支。

UNVERIFIED:当前远端多数 CI 排队,原因未归因,单独作为 diagnostic;不宣称 CI 全绿。真实模型、完整上下文延续、渐进 UI、全部远端后端/Host 与完整成本不在本次证据内,完整目标结束前的回归尚待执行。历史基线故障和早期 fixture/provider 选择次序失败均保留;修正 fixture 后在真实 SQLite 重跑通过,没有改变生产权限规则或断言。回滚只需恢复两个 import,不需要状态迁移。

语义与 CI 对齐

本次复用既有 typed vocabulary,没有新增 Enum、协议状态或义务文本。研究领域语义留在研究 capability,通用终态没有凭 prose/substring 分类。既有默认关闭策略保持不变;普通 Todo 的隔离经过验证,关闭策略的重规划 Todo 仍加载是明确剩余缺口。原权限、source、claim、stop 和 settlement 约束均保留,最终 semantic vocabulary/premerge 检查通过;排队 CI 仍由独立 readiness 判断。

我的整体评价 / Verdict

这是 justified_increment:普通工作已经得到可以持久化、回读并重复重放的实际结果,修复也可独立回滚。long_horizon 与 user_experience 在这一边界均 improved:不再需要恢复无关研究实现来记录普通结果,重复尝试不产生重复效果,也没有新增用户确认或操作轮次。生产成本仅两个 import 的位置变化;兼容请求与原回执保留有真实调用者依据,architecture assessment 为 retain,当前边界合理。

本次仅检查终态后端加载与既有 CLI 路径,没有渲染页面或首屏变化。原目标的真实模型采用和渐进 UI 资格仍未验证。下一步沿原配置 owner 核对关闭策略的重规划解析,继续既有 R1/C1 验收;本结论不关闭原目标。最终精确 head 为 83b1a630dd6c78e479dd25097715e97b081cfb56,没有未解决的阻断 finding;评审 APPROVE 与合入权限、CI readiness 分开执行。

English verdict: APPROVE 83b1a63. The existing Todo applicability guard now precedes research implementation loading; real File/SQLite completion, original-receipt replay and selected-failure isolation pass in source and independently installed Core. Native, CLI, C1 combinations and final premerge pass. Generic-replan disabled loading, full RFC qualification and queued CI remain explicitly separate.

@cocolord
cocolord merged commit 70f25c9 into main Nov 14, 2026
12 of 16 checks passed
@cocolord
cocolord deleted the codex/r1-terminal-domain-loading-20261114t051240 branch November 14, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant